package com.itany.shop.service;

import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;


/**
 * @author 黄衡熙
 * @version 1.0
 */
public interface CartService {
    /**
     * 加入购物车
     * @param cart 购物车
     * @param id 加入购物车的商品主键
     */
    void addCart(Cart cart,String id) throws RequestParameterErrorException;
    /**
     * 修改指定明细的数量
     * @param cart
     * @param id
     * @param num
     */
    void modifyCart(Cart cart,String id,String num) throws UserNotLoginException, RequestParameterErrorException;

    /**
     * 删除指定明细
     * @param cart
     * @param id
     */
    void removeCart(Cart cart,String id) throws UserNotLoginException, RequestParameterErrorException;

}
